//
//  SNewsMyFourTableViewCell.m
//  News
//
//  Created by dlios on 15-5-15.
//  Copyright (c) 2015年 PEAK. All rights reserved.
//

#import "SNewsMyFourTableViewCell.h"

@implementation SNewsMyFourTableViewCell

-(void)dealloc
{
    
    [_cellImageView release];
    [_modelOne release];
    [super dealloc];
}

- (void)awakeFromNib {
    // Initialization code
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.cellImageView = [[UIImageView alloc] init];
//        _cellImageView.backgroundColor = [UIColor redColor];

        [self.contentView addSubview:_cellImageView];
        [_cellImageView release];
    }
    return self;
}


-(void)layoutSubviews
{
    
    [super layoutSubviews];
    
    _cellImageView.frame =self.contentView.bounds;
    
}

-(void)setModelOne:(SNewsOne *)modelOne
{
    
    if (modelOne != _modelOne) {
        [_modelOne release];
        _modelOne = [modelOne retain];
        
    }

    NSURL* url = [NSURL URLWithString:modelOne.imgsrc];
    [_cellImageView sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"``_3(NZ4U{L@4L7FN0J70DA"]];
 
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
